package beans;
 
import java.io.IOException;
import javax.faces.bean.ManagedBean;
import javax.faces.context.FacesContext;
import javax.servlet.http.HttpServletRequest;

/**
 *
 * @author Amauri
 */
@ManagedBean
public class AreaInicial {
 
    private final HttpServletRequest httpServletRequest;
    private final FacesContext facesContext;
    
    public AreaInicial(){
        facesContext = FacesContext.getCurrentInstance();
        httpServletRequest = (HttpServletRequest)facesContext.getExternalContext().getRequest();
    }
    
    public void desconectar() throws IOException{
        httpServletRequest.getSession().invalidate();
        facesContext.getExternalContext().redirect("../index.jsf");
    }
    
}
